home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / cddbco1a / cddbse~1.exe / %MAINDIR% / Form1.frm (.txt) next >
Encoding:
Visual Basic Form  |  1999-09-14  |  4.5 KB  |  154 lines

  1. VERSION 5.00
  2. Object = "{C2C54FE0-6AA3-11D3-941C-444553540000}#5.0#0"; "CDDBAXC.OCX"
  3. Begin VB.Form Form1 
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "CDDB Control Demo"
  6.    ClientHeight    =   3600
  7.    ClientLeft      =   45
  8.    ClientTop       =   330
  9.    ClientWidth     =   8010
  10.    LinkTopic       =   "Form1"
  11.    LockControls    =   -1  'True
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   3600
  15.    ScaleWidth      =   8010
  16.    StartUpPosition =   3  'Windows Default
  17.    Begin CDDBActiveXControl.CDDB CDDB1 
  18.       Left            =   6240
  19.       Top             =   2520
  20.       _ExtentX        =   1535
  21.       _ExtentY        =   1058
  22.    End
  23.    Begin VB.TextBox Text2 
  24.       Height          =   285
  25.       Left            =   5040
  26.       Locked          =   -1  'True
  27.       TabIndex        =   4
  28.       Top             =   1680
  29.       Width           =   2895
  30.    End
  31.    Begin VB.TextBox Text1 
  32.       Height          =   285
  33.       Left            =   5040
  34.       Locked          =   -1  'True
  35.       TabIndex        =   3
  36.       Top             =   960
  37.       Width           =   2895
  38.    End
  39.    Begin VB.CommandButton Command1 
  40.       Caption         =   "Load"
  41.       Height          =   375
  42.       Left            =   7200
  43.       TabIndex        =   2
  44.       Top             =   120
  45.       Width           =   735
  46.    End
  47.    Begin VB.DriveListBox Drive1 
  48.       Height          =   315
  49.       Left            =   5040
  50.       TabIndex        =   1
  51.       Top             =   120
  52.       Width           =   2055
  53.    End
  54.    Begin VB.ListBox List1 
  55.       Height          =   3180
  56.       Left            =   120
  57.       TabIndex        =   0
  58.       Top             =   120
  59.       Width           =   4815
  60.    End
  61.    Begin VB.TextBox Text3 
  62.       Height          =   285
  63.       Left            =   5040
  64.       Locked          =   -1  'True
  65.       TabIndex        =   10
  66.       Top             =   2400
  67.       Width           =   2895
  68.    End
  69.    Begin VB.Label Label5 
  70.       AutoSize        =   -1  'True
  71.       Caption         =   "Genre:"
  72.       Height          =   195
  73.       Left            =   5040
  74.       TabIndex        =   9
  75.       Top             =   2160
  76.       Width           =   480
  77.    End
  78.    Begin VB.Label Label4 
  79.       AutoSize        =   -1  'True
  80.       Caption         =   "Number Of Tracks: 0"
  81.       Height          =   195
  82.       Left            =   5040
  83.       TabIndex        =   8
  84.       Top             =   3120
  85.       Width           =   1485
  86.    End
  87.    Begin VB.Label Label3 
  88.       AutoSize        =   -1  'True
  89.       Caption         =   "Current Disk ID: [No CD]"
  90.       Height          =   195
  91.       Left            =   5040
  92.       TabIndex        =   7
  93.       Top             =   2880
  94.       Width           =   1740
  95.    End
  96.    Begin VB.Label Label2 
  97.       AutoSize        =   -1  'True
  98.       Caption         =   "CD Title:"
  99.       Height          =   195
  100.       Left            =   5040
  101.       TabIndex        =   6
  102.       Top             =   1440
  103.       Width           =   615
  104.    End
  105.    Begin VB.Label Label1 
  106.       AutoSize        =   -1  'True
  107.       Caption         =   "Artist"
  108.       Height          =   195
  109.       Left            =   5040
  110.       TabIndex        =   5
  111.       Top             =   720
  112.       Width           =   345
  113.    End
  114. Attribute VB_Name = "Form1"
  115. Attribute VB_GlobalNameSpace = False
  116. Attribute VB_Creatable = False
  117. Attribute VB_PredeclaredId = True
  118. Attribute VB_Exposed = False
  119. Private Sub CDDB1_CDInfo(Artist As Variant, Title As Variant, Genre As Variant)
  120. Text1.Text = Artist
  121. Text2.Text = Title
  122. Text3.Text = Genre
  123. End Sub
  124. Private Sub CDDB1_Connected()
  125. List1.Clear
  126. Text1.Text = ""
  127. Text2.Text = ""
  128. Text3.Text = ""
  129. Caption = "CDDB Control Demo [Connected]"
  130. End Sub
  131. Private Sub CDDB1_Disconnected()
  132. Caption = "CDDB Control Demo [Disconnected]"
  133. Label3.Caption = "Current Disk ID: [No CD]"
  134. Command1.Enabled = True
  135. End Sub
  136. Private Sub CDDB1_DiskLoaded()
  137. Label3.Caption = "Current Disk ID: " & CDDB1.DiskID
  138. CDDB1.Connect Server1
  139. End Sub
  140. Private Sub CDDB1_Tracks(Number As Variant, Title As Variant)
  141. If Len(Number) = 1 Then
  142. Number = "0" & Number
  143. End If
  144. List1.AddItem Number & ":" & vbTab & Title
  145. Label4.Caption = "Number Of Tracks: " & Number
  146. End Sub
  147. Private Sub Command1_Click()
  148. If InStr(1, Drive1.Drive, "[DRIVE]") <> 0 Then Exit Sub
  149. If InStr(1, Drive1.Drive, "a:") <> 0 Then Exit Sub
  150. CDDB1.LoadDisk Drive1.Drive
  151. Caption = "CDDB Control Demo [Connecting...]"
  152. Command1.Enabled = False
  153. End Sub
  154.